
list1 = [465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
#1.1、取出第六个的值
print(list1[5])#第六个值是12534
#1.2、判断，如果列表中的值是561231561，则输出：今天你猜对了哦~~~~
"""
for i in list1 :
    if i == 561231561:
        print("今天你猜对了哦~~~~")
"""
#1.3、打印这个列表里面所有的偶数
"""
for i in list1:
    if i % 2 ==0:
        print(i)
"""
#2、定义集合，使用for遍历访问元素
"""
set1 = {465,8231}
for i in set1:
    print(i)
"""
#3、定义字符串，使用for遍历访问元素
"""
str = "465,8231"
for j in str:
    print(j)
"""
#4、定义字典，使用for遍历访问元素
"""
zd = {"1":"辽宁省",
      "2":"沈阳市",
      "3":"沈河区"}
for i,j in zd.items():
    print(f"i: {i}, j: {j}")
"""
#5、定义列表，使用for遍历访问元素
"""
list2 = [1,2,3,4,5]
for wyxlist in list2 :
    print(wyxlist)
"""
#6、遍历：{465,84564,5641,21564,1891563,481564,651,"王长帅","王李","李四","王三"}
"""
{465,84564,5641,21564,1891563,481564,651,"王长帅","王李","李四","王三"}
my_set = {465,84564,5641,21564,1891563,481564,651,"王长帅","王李","李四","王三"}
for i in my_set:
    print(i)
"""
#6.1、使用for循环遍历上面的集合，如果输出到了王长帅，则循环结束
my_set = {12,23,34,45,56,67,78,"王长帅","王二","王三","王四"}
for i in my_set:
    print(i)
    if i == "王长帅":
        break